<%@ page language="java" contentType="text/html; charset=utf-8"%>
<%@ include file="/WEB-INF/layouts/base.jsp"%>
<!DOCTYPE HTML>
<html>
<head>
<title>
	<c:if test="${empty role}">创建角色</c:if>
	<c:if test="${!empty role }">修改角色</c:if>
</title>
<script type="text/javascript" src="${basePath }/static/admin/main/js/add-role.js"></script>
   
</head>
  <body class="gray-bg">
    <div class="wrapper add-member-content animated fadeInRight">
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5><c:if test="${empty role}">创建角色</c:if><c:if test="${!empty role}">修改角色信息</c:if> </h5>
                        <div class="ibox-tools">
                            <a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
                            <a class="close-link"><i class="fa fa-times"></i></a>
                        </div>
                    </div>
                    <div class="ibox-content">
                        <form id="roleform" class="form-horizontal">
                        	<input type="hidden" name="id" id="roleId" value="${role.id }"/>
                            <div class="form-group m-t">
                            	<label class="col-sm-2 control-label">角色名:</label>
								<div class="col-sm-4">
									<div class="input-icon right">
										<i class="fa"></i>
	                                	<input type="text" class="form-control" required name="roleName" value="${role.roleName}"/>
                                	</div>
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                            <div class="form-group m-t">
                            	<label class="col-sm-2 control-label">简码:</label>
								<div class="col-sm-4">
									<div class="input-icon right">
										<i class="fa"></i>
	                                	<input type="text" class="form-control" required name="roleCode" value="${role.roleCode}"/>
                                	</div>
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                           	<div class="form-group">
								<label class="col-sm-2 control-label">描述:</label>
								<div class="col-sm-4">
									<div class="input-icon right">
										<i class="fa"></i>
	                                	<input type="text" class="form-control" name="desc" value="${role.desc }"/>
	                               	</div>
	                            </div> 
                            </div>
                            <div class="hr-line-dashed"></div> 
                            <div class="form-group">
                            	<label class="col-sm-2 control-label">菜单权限:</label>
                            	<div class="col-sm-4">
									<input type="hidden" id="menuIds" name="menuIds"/>
        							<ul id="menuTree" class="ztree" style="margin-top:0; width:160px;"></ul>
                                </div> 
                            </div>
                           	<div class="hr-line-dashed"></div>
                           	<div class="form-group">
                                <div class="col-sm-4 col-sm-offset-2 add-submit">
                                <input type="hidden" class="form-control" name="id" value="${role.id}" id="roleId">
                                <input class="btn btn-primary" type="button" id="roleSubmit" value="提交"/>
                                </div>
                           	</div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</body>
</html>
